<?php
require_once '../../library/config.php';
require_once '../library/functions.php';

	if (isset($_GET['loaitc_id']) && $_GET['loaitc_id'] > 0) {
	$loaitc_id = (int)$_GET['loaitc_id'];
	} 
	$sql = "SELECT id, tentc
			FROM tapchi tc
			WHERE tc.loaitc_id = $loaitc_id and hieu_luc = 1";
	
	$result = dbQuery($sql) ;

	$list1 = '<option value="-1" selected="true">--Chọn tạp chí--</option>';
	
	while($row = dbFetchArray($result)) {
		list($id, $name) = $row;
		$list1 .= "<option value=\"$id\"";
		$list1 .= ">$name</option>\r\n";
	}	
	echo $list1;
?>